package ads_topic

import (
	"server/middleware"

	"github.com/gin-gonic/gin"
)

type AdsTopicRouter struct {
}

func (s *AdsTopicRouter) InitAdsTopicRouter(Router *gin.RouterGroup) {
	adsTopicRouter := Router.Group("adsTopic").Use(middleware.OperationRecord())
	adsTopicRouterWithoutRecord := Router.Group("adsTopic")
	var adsTopicApi = AdsTopicApi{}
	{
		adsTopicRouter.POST("createAdsTopic", adsTopicApi.CreateAdsTopic)
		adsTopicRouter.DELETE("deleteAdsTopic", adsTopicApi.DeleteAdsTopic)
		adsTopicRouter.DELETE("deleteAdsTopicByIds", adsTopicApi.DeleteAdsTopicByIds)
		adsTopicRouter.PUT("updateAdsTopic", adsTopicApi.UpdateAdsTopic)
	}
	{
		adsTopicRouterWithoutRecord.GET("findAdsTopic", adsTopicApi.FindAdsTopic)
		adsTopicRouterWithoutRecord.GET("getAllAdsTopics", adsTopicApi.GetAllAdsTopics)
		adsTopicRouterWithoutRecord.GET("getAdsTopicList", adsTopicApi.GetAdsTopicList)
		adsTopicRouterWithoutRecord.POST("getAdsTopic", adsTopicApi.GetAdsTopic)
	}
}
